#ifndef _ISYSTEM_H_
#define _ISYSTEM_H_

////////////////////////////////////////////////////////////////////////////////////////////////
// Forward declarations
////////////////////////////////////////////////////////////////////////////////////////////////

struct ISystem;
struct IGame;
struct IRenderer;

struct SSystemGlobalEnvironment
{
	ISystem*		pSystem;
	IGame*			pGame;
	IRenderer*		pRenderer;
}

struct ISystem
{
	// Summary:
	// Releases ISystem.
	virtual void Release() = 0;

	// Summary:
	//	 Returns pointer to the global environment structure.
	virtual SSystemGlobalEnvironment* GetGlobalEnvironment() = 0;

	// Summary:
	//	 Updates all subsystems (including the ScriptSink() )
	// Arguments:
	//   flags		- One or more flags from ESystemUpdateFlags structure.
	//   nPauseMode - 0=normal(no pause), 1=menu/pause, 2=cutscene
	virtual bool Update( int updateFlags=0, int nPauseMode=0 ) = 0;

	// Summary:
	//	 Begins rendering frame.
	virtual void	RenderBegin() = 0;
	// Summary:
	//	 Renders subsystems.
	virtual void	Render() = 0;
	// Summary:
	//	 Ends rendering frame and swap back buffer.
	virtual void	RenderEnd( bool bRenderStats=true ) = 0;

	// Summary:
	//	 Quits the application.
	virtual void	Quit() = 0;
	// Summary:
	//	 Returns true if the application is in the shutdown phase.
	virtual bool	IsQuitting() = 0;

};

#endif//_ISYSTEM_H_